using System;
using System.Data;
using System.Collections;
using System.Text;

using EntLibEC.Cmn;
using System.Transactions;
using EntLibEC.Info.Basic;
using EntLibEC.Dac;
using EntLibEC.Dac.Basic;

namespace EntLibEC.Biz.Basic
{
	/// <summary>
	/// Summary description for SMSManager.
	/// </summary>
	public class SMSManager
	{
		private SMSManager()
		{
		}
		private static SMSManager _instance;
		public static SMSManager GetInstance()
		{
			if ( _instance == null )
			{
				_instance = new SMSManager();
			}
			return _instance;
		}
		public void Insert(SMSInfo oInfo)
		{
			TransactionOptions options = new TransactionOptions();
            options.IsolationLevel = System.Transactions.IsolationLevel.ReadCommitted;
            options.Timeout = TransactionManager.DefaultTimeout;

            using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, options))
            {

				new SMSDac().Insert(oInfo);

				scope.Complete();
            }
		}
	}
}
